from django.urls import path
from .views import *

app_name = 'aoduo_admin'
urlpatterns = [
    #  base
    path('login/', AdminBaseInfoView.as_view()),  # post, delete
    # user control
    path('user/list/', AdminUserListInfoView.as_view(), name='all_user_list'),  # get
    path('user/<int:uid>/', AdminUserControlView.as_view(), name='admin_user_control'),  # get put delete
    path('user/new/', AdminUserControlView.as_view(), name='admin_new_user'),  # post
    # chief admin
    path('chief/admin/new/', AdminInfoView.as_view(), name='chief_admin_new'),  # post
    path('chief/admin/<int:adminID>/', AdminInfoView.as_view(), name='chief_admin_info'),  # delete
    path('chief/group/list/', AdminGroupListView.as_view(), name='chief_admin_group_list'),  # get
    path('chief/group/new/', AdminGroupInfoView.as_view(), name='chief_admin_new_group'),  # post
    path('chief/group/<int:gid>/', AdminGroupInfoView.as_view(), name='chief_admin_mod_group'),  # get, put, delete
    path('chief/auth/list/', AdminAuthTypeInfoView.as_view(), name='chief_admin_auth_list'),
    # outdoor activity
    path('outdoor/activity/list/', AdminActivityListInfoView.as_view(), name='admin_activity_list'),  # get
    path('outdoor/activity/<int:acid>/', AdminActivityControlView.as_view(), name='admin_activity_info'),  # get, put
    path('outdoor/activity/type/', AdminActivityTypeControlView.as_view(), name='admin_activity_new_type'),  # post
    path('outdoor/activity/type/<int:tpid>/', AdminActivityTypeControlView.as_view(),
         name='admin_activity_type_control'),   # get, put, delete
    path('outdoor/activity/type/list/', AdminActivityTypeListInfoView.as_view(), name='admin_activity_type_list'),  # get
]
